<div>
  <div>
    Fragment: <%= @fragment.name %>
  </div>

  <h2>Mappings</h2>
  <div id="fragment_mappings">
    <% @fragment.concepts.mapped.each do |concept| %>
      <div class="mapping">
        <div class="concept_name">
          <span class="label">Concept: </span>
          <span class="concept_name"><%= concept.name %></span>
          <div>
            <span class="label">Local Key: </span>
            <span><%= concept.local_key %></span>
          </div>
        </div>
        <div><span class="label">Maps to:</span></div>
        <table>
          <tr>
            <th class="frag_col">Fragment</th>
            <th>Concept Name</th>
            <th>Local Key</th>
          </tr>
          <% concept.mappings.each do |mapping| %>
            <tr>
              <td><%= mapping.fragment.name %></td>
              <td><%= mapping.name %></td>
              <td><%= mapping.local_key %></td>
            </tr>
          <% end %>
        </table>
      </div>
    <% end %>
  </div>
</div>